package com.sftz.modules.minapp.myorder.module;

import java.util.Map;

import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;

import com.sftz.modules.minapp.myorder.form.MyOrderForm;
import com.sftz.modules.minapp.myorder.service.MyOrderService;

/**
 * 我的订单
 * @author   王宏伟
 * @Date	 2018年12月11日
 */
@IocBean
@At("/wx/myorder/")
public class MyOrderModule {
	@Inject
	private MyOrderService myOrderService;

	/**
	 * 订单列表
	 * @param session
	 * @return
	 */
	@At
	@Ok("json")
	public Map<String, Object> dataList(@Param("..") final MyOrderForm form) {
		return myOrderService.orderList(form);
	}

	/**
	 * 订单列表状态
	 * @param session
	 * @return
	 */
	@At
	@Ok("json")
	public Map<String, Object> orderStateEnum() {
		return myOrderService.orderStateEnum();
	}

}
